#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    this->setWindowTitle("Qt lcd control");
    ui->lcdLabel->setPixelSize(3);
    ui->lcdLabel->setTextColor(Qt::red);

    QTimer *pTimer = new QTimer(this);
    pTimer->setInterval(100);
    pTimer->start();

    connect(pTimer, &QTimer::timeout, this, [&](){
        static int nCount = 0;
        ui->lcdLabel->setText(QString("功率扫描,请保持踏尽油门  %1").arg(++nCount));
    });
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::resizeEvent(QResizeEvent *event){
}
